# -*- coding: utf-8 -*-
import time
from openerp.report import report_sxw
from openerp.osv import fields, osv
from openerp.addons.dm_base import utils
from openerp.tools.translate import _
    
class account_voucher(osv.osv):
    _inherit = "account.voucher"
    def default_get(self, cr, uid, fields_list, context=None):
        defaults = super(account_voucher, self).default_get(cr, uid, fields_list, context=context)
        #不自动设置account_id
        if defaults.get('journal_id'):
            defaults['journal_id'] = None
        return defaults
    
class cash_bank_trans(osv.osv):
    _inherit = "cash.bank.trans"
    def default_get(self, cr, uid, fields_list, context=None):
        defaults = super(cash_bank_trans, self).default_get(cr, uid, fields_list, context=context)
        #不自动设置
        if defaults.get('journal_cash_id'):
            defaults['journal_cash_id'] = None
        if defaults.get('journal_bank_id'):
            defaults['journal_bank_id'] = None
        return defaults

    
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: